]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab.js: remove Alt+Tab's special case
authorRui Matos <tiagomatos@gmail.com>
Wed, 23 Feb 2011 10:52:25 +0000 (10:52 +0000)
committerDan Winship <danw@gnome.org>
Wed, 20 Apr 2011 18:43:14 +0000 (14:43 -0400)
Alt+Tab's special case of "switch to the most-recently-used window even if
it's in the same app" is actually an hindrance for users to get a firm mental
model of Alt+Tab. Now that we have Alt+Above_Tab the special case is no longer
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=647907

js/ui/altTab.js

index 54a4567066e93d4d1a16d5be0faa35bbfcc9f7e4..ed541b31663f5c387aa913b03a64a406a1de9b58 100644 (file)
@@ -156,29 +156,11 @@ AltTabPopup.prototype = {
                     this._select(0, 0);
             }
         } else if (this._appIcons.length == 1) {
-            if (!backward && this._appIcons[0].cachedWindows.length > 1) {
-                // For compatibility with the multi-app case below
-                this._select(0, 1, true);
-            } else
-                this._select(0);
+            this._select(0);
         } else if (backward) {
             this._select(this._appIcons.length - 1);
         } else {
-            let firstWindows = this._appIcons[0].cachedWindows;
-            if (firstWindows.length > 1) {
-                let curAppNextWindow = firstWindows[1];
-                let nextAppWindow = this._appIcons[1].cachedWindows[0];
-
-                // If the next window of the current app is more-recently-used
-                // than the first window of the next app, then select it.
-                if (curAppNextWindow.get_workspace() == global.screen.get_active_workspace() &&
-                    curAppNextWindow.get_user_time() > nextAppWindow.get_user_time())
-                    this._select(0, 1, true);
-                else
-                    this._select(1);
-            } else {
-                this._select(1);
-            }
+            this._select(1);
         }
 
         // There's a race condition; if the user released Alt before